package com.chaopei.consumer_feign.controller;

import com.chaopei.consumer_feign.service.FeignSevice;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Author yws
 * @Date 2022/4/27 10:05
 */
@RestController
public class FeignController {
    @Resource
    FeignSevice feignSevice;
    @RequestMapping("/go")
    public String go(String info){
        //获取外部服务数据，同时传递参数到外部服务。
        String info1 = feignSevice.getInfo(info);
        return "拿到："+info1;
    }
    @RequestMapping("/play")
    public String play(){
        return "这里是feign";
    }
}
